import { defineStore } from "pinia"; 
import piniaPersistConfig from "@/stores/helper/persist";

export const useDefaultStore = defineStore({
  id: "geeker-global",
  // 修改默认值之后，需清除 localStorage 数据
  state: () => ({
  
    downVisable:false,//下载展示
    
  }),
  getters: {},
  actions: {
    // Set GlobalState
    setGlobalState(...args: ObjToKeyValArray<any>) {
		//console.log(...args)
      this.$patch({ [args[0]]: args[1] });
      window["merak_"+args[0]]=args[1];
    }
  },
  persist: piniaPersistConfig("geeker-default")
});
